using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;

namespace TanashCMS.Business
{
    [DataObject(true)]
    public class TanashCustomer
    {
        private int mID;
        private string mName;

        public virtual int ID
        {
            get
            {
                return mID;
            }
            set
            {
                mID = value;
            }
        }

        public virtual string Name
        {
            get
            {
                return mName;
            }
            set
            {
                mName = value;
            }
        }

        public static List<TanashCustomer> List()
        {
            return (List<TanashCustomer>)Configuration.GetCurrentSession().CreateQuery("select customer from TanashCustomer customer").List<TanashCustomer>();
        }

        public static void Update(TanashCustomer Customer)
        {
            Configuration.GetCurrentSession().SaveOrUpdate(Customer);
        }
        public static void Insert(TanashCustomer Customer)
        {
            Configuration.GetCurrentSession().Save(Customer);
        }
        public static void Delete(TanashCustomer Customer)
        {
            Configuration.GetCurrentSession().Delete(Customer);
        }
    }
}
